package com.asa.voice.mp3.asa.decoder;

public final class Layer3 extends Layer123 {
	  protected int granules;
	  
	  private int channels;
	  
	  private Header header;
	  
	  private BitStream bsSI;
	  
	  private BitStreamMainData maindataStream;
	  
	  private int main_data_begin;
	  
	  private int[] scfsi;
	  
	  private ChannelInformation[][] channelInfo;
	  
	  private int[] sfbIndexLong;
	  
	  private int[] sfbIndexShort;
	  
	  private boolean isMPEG1;
	  
	  private SynthesisConcurrent filterCh0;
	  
	  private SynthesisConcurrent filterCh1;
	  
	  private int semaphore;
	  
	  private int[][] scalefacLong;
	  
	  private int[][] scalefacShort;
	  
	  private int[] i_slen2;
	  
	  private int[] n_slen2;
	  
	  private byte[][][] nr_of_sfb;
	  
	  private int[] slen0;
	  
	  private int[] slen1;
	  
	  private int[] hv;
	  
	  private int[] rzeroIndex;
	  
	  private float[][] xrch0;
	  
	  private float[][] xrch1;
	  
	  private float[] floatPow2;
	  
	  private float[] floatPowIS;
	  
	  private int[] widthLong;
	  
	  private int[] widthShort;
	  
	  private int rzeroBandLong;
	  
	  private int[] rzeroBandShort;
	  
	  private int[] pretab;
	  
	  private float[][] lsf_is_coef;
	  
	  private float[] is_coef;
	  
	  private float[][] imdctWin;
	  
	  private float[] preBlckCh0;
	  
	  private float[] preBlckCh1;
	  
	  public Layer3(Header paramHeader, IAudio paramIAudio) {
	    super(paramHeader, paramIAudio);
	    this.slen0 = new int[] { 
	        0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 
	        2, 3, 3, 3, 4, 4 };
	    this.slen1 = new int[] { 
	        0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 
	        3, 1, 2, 3, 2, 3 };
	    this.rzeroIndex = new int[2];
	    this.rzeroBandShort = new int[3];
	    this.pretab = new int[] { 
	        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
	        0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 
	        2, 0 };
	    this.imdctWin = new float[][] { { 
	          0.0322824F, 0.1072064F, 0.2014143F, 0.3256164F, 0.5F, 0.7677747F, 1.2412229F, 2.3319514F, 7.7441506F, -8.451257F, 
	          -3.039058F, -1.9483297F, -1.4748814F, -1.2071068F, -1.0327232F, -0.9085211F, -0.8143131F, -0.7393892F, -0.6775254F, -0.6248445F, 
	          -0.5787917F, -0.5376016F, -0.5F, -0.4650284F, -0.4319343F, -0.4000996F, -0.3689899F, -0.338117F, -0.3070072F, -0.2751725F, 
	          -0.2420785F, -0.2071068F, -0.1695052F, -0.1283151F, -0.0822624F, -0.0295815F }, { 
	          0.0322824F, 0.1072064F, 0.2014143F, 0.3256164F, 0.5F, 0.7677747F, 1.2412229F, 2.3319514F, 7.7441506F, -8.451257F, 
	          -3.039058F, -1.9483297F, -1.4748814F, -1.2071068F, -1.0327232F, -0.9085211F, -0.8143131F, -0.7393892F, -0.6781709F, -0.6302362F, 
	          -0.5928445F, -0.563691F, -0.5411961F, -0.5242646F, -0.5077583F, -0.4659258F, -0.3970546F, -0.3046707F, -0.1929928F, -0.0668476F, 
	          -0.0F, -0.0F, -0.0F, -0.0F, -0.0F, -0.0F }, {}, { 
	          0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.3015303F, 1.4659259F, 6.978106F, -9.094045F, 
	          -3.5390582F, -2.29035F, -1.6627548F, -1.306563F, -1.0828403F, -0.9305795F, -0.8213398F, -0.7400936F, -0.6775254F, -0.6248445F, 
	          -0.5787917F, -0.5376016F, -0.5F, -0.4650284F, -0.4319343F, -0.4000996F, -0.3689899F, -0.338117F, -0.3070072F, -0.2751725F, 
	          -0.2420785F, -0.2071068F, -0.1695052F, -0.1283151F, -0.0822624F, -0.0295815F } };
	    this.header = paramHeader;
	    this.isMPEG1 = (this.header.getVersion() == 3);
	    this.granules = this.isMPEG1 ? 2 : 1;
	    this.channels = this.header.getChannels();
	    this.semaphore = this.channels;
	    this.maindataStream = new BitStreamMainData(4096, 512);
	    this.scfsi = new int[this.channels];
	    this.bsSI = new BitStream(0, 0);
	    this.scalefacLong = new int[this.channels][23];
	    this.scalefacShort = new int[this.channels][39];
	    this.hv = new int[580];
	    this.widthLong = new int[22];
	    this.widthShort = new int[13];
	    this.channelInfo = new ChannelInformation[this.granules][this.channels];
	    byte b;
	    for (b = 0; b < this.granules; b++) {
	      for (byte b1 = 0; b1 < this.channels; b1++)
	        this.channelInfo[b][b1] = new ChannelInformation(); 
	    } 
	    this.filterCh0 = new SynthesisConcurrent(this, 0);
	    (new Thread(this.filterCh0, "synthesis_left")).start();
	    this.xrch0 = this.filterCh0.getBuffer();
	    this.preBlckCh0 = new float[576];
	    if (this.channels == 2) {
	      this.filterCh1 = new SynthesisConcurrent(this, 1);
	      (new Thread(this.filterCh1, "synthesis_right")).start();
	      this.xrch1 = this.filterCh1.getBuffer();
	      this.preBlckCh1 = new float[576];
	    } 
	    this.floatPowIS = new float[8207];
	    for (b = 0; b < floatPowIS.length; b++) {
	    	System.out.println(b);
	      this.floatPowIS[b] = (float)Math.pow(b, 1.3333333333333333D); 
	    }
	    this.floatPow2 = new float[374];
	    for (b = 0; b < floatPow2.length; b++)
	      this.floatPow2[b] = (float)Math.pow(2.0D, -0.25D * (b - 45)); 
	    int i = this.header.getSamplingFrequency();
	    i += this.isMPEG1 ? 0 : ((this.header.getVersion() == 2) ? 3 : 6);
	    switch (i) {
	      case 0:
	        this.sfbIndexLong = new int[] { 
	            0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 
	            52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 
	            342, 418, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 
	            84, 106, 136, 192 };
	        break;
	      case 1:
	        this.sfbIndexLong = new int[] { 
	            0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 
	            50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 
	            330, 384, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 
	            80, 100, 126, 192 };
	        break;
	      case 2:
	        this.sfbIndexLong = new int[] { 
	            0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 
	            54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 
	            448, 550, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 
	            104, 138, 180, 192 };
	        break;
	      case 3:
	        this.sfbIndexLong = new int[] { 
	            0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 
	            80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 
	            464, 522, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 
	            100, 132, 174, 192 };
	        break;
	      case 4:
	        this.sfbIndexLong = new int[] { 
	            0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 
	            80, 96, 114, 136, 162, 194, 232, 278, 330, 394, 
	            464, 540, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 
	            104, 136, 180, 192 };
	        break;
	      case 5:
	        this.sfbIndexLong = new int[] { 
	            0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 
	            80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 
	            464, 522, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 
	            104, 134, 174, 192 };
	        break;
	      case 6:
	        this.sfbIndexLong = new int[] { 
	            0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 
	            80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 
	            464, 522, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 
	            104, 134, 174, 192 };
	        break;
	      case 7:
	        this.sfbIndexLong = new int[] { 
	            0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 
	            80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 
	            464, 522, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 
	            104, 134, 174, 192 };
	        break;
	      case 8:
	        this.sfbIndexLong = new int[] { 
	            0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 
	            160, 192, 232, 280, 336, 400, 476, 566, 568, 570, 
	            572, 574, 576 };
	        this.sfbIndexShort = new int[] { 
	            0, 8, 16, 24, 36, 52, 72, 96, 124, 160, 
	            162, 164, 166, 192 };
	        break;
	    } 
	    for (b = 0; b < 22; b++)
	      this.widthLong[b] = this.sfbIndexLong[b + 1] - this.sfbIndexLong[b]; 
	    for (b = 0; b < 13; b++)
	      this.widthShort[b] = this.sfbIndexShort[b + 1] - this.sfbIndexShort[b]; 
	    if (this.isMPEG1) {
	      this.is_coef = new float[] { 0.0F, 0.21132487F, 0.36602542F, 0.5F, 0.6339746F, 0.7886751F, 1.0F };
	    } else {
	      this.lsf_is_coef = new float[][] { { 
	            0.8408964F, 0.70710677F, 0.59460354F, 0.5F, 0.4204482F, 0.35355338F, 0.29730177F, 0.25F, 0.2102241F, 0.17677669F, 
	            0.14865088F, 0.125F, 0.10511205F, 0.088388346F, 0.07432544F }, { 
	            0.70710677F, 0.5F, 0.35355338F, 0.25F, 0.17677669F, 0.125F, 0.088388346F, 0.0625F, 0.044194173F, 0.03125F, 
	            0.022097087F, 0.015625F, 0.011048543F, 0.0078125F, 0.005524272F } };
	      this.i_slen2 = new int[256];
	      this.n_slen2 = new int[512];
	      this.nr_of_sfb = new byte[][][] { { { 6, 5, 5, 5 }, { 6, 5, 7, 3 }, { 11, 10, 0, 0 }, { 7, 7, 7, 0 }, { 6, 6, 6, 3 }, { 8, 8, 5, 0 } }, { { 9, 9, 9, 9 }, { 9, 9, 12, 6 }, { 18, 18, 0, 0 }, { 12, 12, 12, 0 }, { 12, 9, 9, 6 }, { 15, 12, 9, 0 } }, { { 6, 9, 9, 9 }, { 6, 9, 12, 6 }, { 15, 18, 0, 0 }, { 6, 15, 12, 0 }, { 6, 12, 9, 6 }, { 6, 18, 9, 0 } } };
	      for (b = 0; b < 5; b++) {
	        for (byte b1 = 0; b1 < 6; b1++) {
	          for (byte b2 = 0; b2 < 6; b2++) {
	            int j = b2 + b1 * 6 + b * 36;
	            this.i_slen2[j] = b | b1 << 3 | b2 << 6 | 0x3000;
	          } 
	        } 
	      } 
	      for (b = 0; b < 4; b++) {
	        for (byte b1 = 0; b1 < 4; b1++) {
	          for (byte b2 = 0; b2 < 4; b2++) {
	            int j = b2 + (b1 << 2) + (b << 4);
	            this.i_slen2[j + 180] = b | b1 << 3 | b2 << 6 | 0x4000;
	          } 
	        } 
	      } 
	      for (b = 0; b < 4; b++) {
	        for (byte b1 = 0; b1 < 3; b1++) {
	          int j = b1 + b * 3;
	          this.i_slen2[j + 244] = b | b1 << 3 | 0x5000;
	          this.n_slen2[j + 500] = b | b1 << 3 | 0x2000 | 0x8000;
	        } 
	      } 
	      for (b = 0; b < 5; b++) {
	        for (byte b1 = 0; b1 < 5; b1++) {
	          for (byte b2 = 0; b2 < 4; b2++) {
	            for (byte b3 = 0; b3 < 4; b3++) {
	              int j = b3 + (b2 << 2) + (b1 << 4) + b * 80;
	              this.n_slen2[j] = b | b1 << 3 | b2 << 6 | b3 << 9;
	            } 
	          } 
	        } 
	      } 
	      for (b = 0; b < 5; b++) {
	        for (byte b1 = 0; b1 < 5; b1++) {
	          for (byte b2 = 0; b2 < 4; b2++) {
	            int j = b2 + (b1 << 2) + b * 20;
	            this.n_slen2[j + 400] = b | b1 << 3 | b2 << 6 | 0x1000;
	          } 
	        } 
	      } 
	    } 
	  }
	  
	  private int getSideInfo(byte[] paramArrayOfbyte, int paramInt) {
	    this.bsSI.feed(paramArrayOfbyte, paramInt);
	    if (this.isMPEG1) {
	      this.main_data_begin = this.bsSI.getBits9(9);
	      if (this.channels == 1) {
	        this.bsSI.skipBits(5);
	        this.scfsi[0] = this.bsSI.getBits9(4);
	      } else {
	        this.bsSI.skipBits(3);
	        this.scfsi[0] = this.bsSI.getBits9(4);
	        this.scfsi[1] = this.bsSI.getBits9(4);
	      } 
	      for (byte b = 0; b < 2; b++) {
	        for (byte b1 = 0; b1 < this.channels; b1++) {
	          ChannelInformation channelInformation = this.channelInfo[b][b1];
	          channelInformation.part2_3_length = this.bsSI.getBits17(12);
	          channelInformation.big_values = this.bsSI.getBits9(9);
	          channelInformation.global_gain = this.bsSI.getBits9(8);
	          channelInformation.scalefac_compress = this.bsSI.getBits9(4);
	          channelInformation.window_switching_flag = this.bsSI.get1Bit();
	          if (channelInformation.window_switching_flag != 0) {
	            channelInformation.block_type = this.bsSI.getBits9(2);
	            channelInformation.mixed_block_flag = this.bsSI.get1Bit();
	            channelInformation.table_select[0] = this.bsSI.getBits9(5);
	            channelInformation.table_select[1] = this.bsSI.getBits9(5);
	            channelInformation.subblock_gain[0] = this.bsSI.getBits9(3);
	            channelInformation.subblock_gain[1] = this.bsSI.getBits9(3);
	            channelInformation.subblock_gain[2] = this.bsSI.getBits9(3);
	            if (channelInformation.block_type == 0)
	              return -1; 
	            if (channelInformation.block_type == 2 && channelInformation.mixed_block_flag == 0) {
	              channelInformation.region0_count = 8;
	            } else {
	              channelInformation.region0_count = 7;
	            } 
	            channelInformation.region1_count = 20 - channelInformation.region0_count;
	          } else {
	            channelInformation.table_select[0] = this.bsSI.getBits9(5);
	            channelInformation.table_select[1] = this.bsSI.getBits9(5);
	            channelInformation.table_select[2] = this.bsSI.getBits9(5);
	            channelInformation.region0_count = this.bsSI.getBits9(4);
	            channelInformation.region1_count = this.bsSI.getBits9(3);
	            channelInformation.block_type = 0;
	          } 
	          channelInformation.preflag = this.bsSI.get1Bit();
	          channelInformation.scalefac_scale = this.bsSI.get1Bit();
	          channelInformation.count1table_select = this.bsSI.get1Bit();
	        } 
	      } 
	    } else {
	      this.main_data_begin = this.bsSI.getBits9(8);
	      if (this.channels == 1) {
	        this.bsSI.get1Bit();
	      } else {
	        this.bsSI.getBits9(2);
	      } 
	      for (byte b = 0; b < this.channels; b++) {
	        ChannelInformation channelInformation = this.channelInfo[0][b];
	        channelInformation.part2_3_length = this.bsSI.getBits17(12);
	        channelInformation.big_values = this.bsSI.getBits9(9);
	        channelInformation.global_gain = this.bsSI.getBits9(8);
	        channelInformation.scalefac_compress = this.bsSI.getBits9(9);
	        channelInformation.window_switching_flag = this.bsSI.get1Bit();
	        if (channelInformation.window_switching_flag != 0) {
	          channelInformation.block_type = this.bsSI.getBits9(2);
	          channelInformation.mixed_block_flag = this.bsSI.get1Bit();
	          channelInformation.table_select[0] = this.bsSI.getBits9(5);
	          channelInformation.table_select[1] = this.bsSI.getBits9(5);
	          channelInformation.subblock_gain[0] = this.bsSI.getBits9(3);
	          channelInformation.subblock_gain[1] = this.bsSI.getBits9(3);
	          channelInformation.subblock_gain[2] = this.bsSI.getBits9(3);
	          if (channelInformation.block_type == 0)
	            return -1; 
	          if (channelInformation.block_type == 2 && channelInformation.mixed_block_flag == 0) {
	            channelInformation.region0_count = 8;
	          } else {
	            channelInformation.region0_count = 7;
	            channelInformation.region1_count = 20 - channelInformation.region0_count;
	          } 
	        } else {
	          channelInformation.table_select[0] = this.bsSI.getBits9(5);
	          channelInformation.table_select[1] = this.bsSI.getBits9(5);
	          channelInformation.table_select[2] = this.bsSI.getBits9(5);
	          channelInformation.region0_count = this.bsSI.getBits9(4);
	          channelInformation.region1_count = this.bsSI.getBits9(3);
	          channelInformation.block_type = 0;
	          channelInformation.mixed_block_flag = 0;
	        } 
	        channelInformation.scalefac_scale = this.bsSI.get1Bit();
	        channelInformation.count1table_select = this.bsSI.get1Bit();
	      } 
	    } 
	    return paramInt + this.header.getSideInfoSize();
	  }
	  
	  private void getScaleFactors_2(int paramInt1, int paramInt2) {
	    int i, j = 0;
	    byte b = 0;
	    boolean bool = this.header.isIntensityStereo();
	    ChannelInformation channelInformation = this.channelInfo[paramInt1][paramInt2];
	    int[] arrayOfInt1 = this.scalefacLong[paramInt2];
	    int[] arrayOfInt2 = this.scalefacShort[paramInt2];
	    this.rzeroBandLong = 0;
	    if (paramInt2 > 0 && bool) {
	      i = this.i_slen2[channelInformation.scalefac_compress >> 1];
	    } else {
	      i = this.n_slen2[channelInformation.scalefac_compress];
	    } 
	    channelInformation.preflag = i >> 15 & 0x1;
	    channelInformation.part2_length = 0;
	    if (channelInformation.block_type == 2) {
	      j++;
	      if (channelInformation.mixed_block_flag != 0)
	        j++; 
	      byte[] arrayOfByte = this.nr_of_sfb[j][i >> 12 & 0x7];
	      byte b1;
	      for (b1 = 0; b1 < 4; b1++) {
	        int k = i & 0x7;
	        i >>= 3;
	        if (k != 0) {
	          for (byte b2 = 0; b2 < arrayOfByte[b1]; b2++)
	            arrayOfInt2[b++] = this.maindataStream.getBits17(k); 
	          channelInformation.part2_length += arrayOfByte[b1] * k;
	        } else {
	          for (byte b2 = 0; b2 < arrayOfByte[b1]; b2++)
	            arrayOfInt2[b++] = 0; 
	        } 
	      } 
	      j = (j << 1) + 1;
	      for (b1 = 0; b1 < j; b1++)
	        arrayOfInt2[b++] = 0; 
	    } else {
	      byte[] arrayOfByte = this.nr_of_sfb[j][i >> 12 & 0x7];
	      byte b1;
	      for (b1 = 0; b1 < 4; b1++) {
	        int k = i & 0x7;
	        i >>= 3;
	        if (k != 0) {
	          for (byte b2 = 0; b2 < arrayOfByte[b1]; b2++)
	            arrayOfInt1[b++] = this.maindataStream.getBits17(k); 
	          channelInformation.part2_length += arrayOfByte[b1] * k;
	        } else {
	          for (byte b2 = 0; b2 < arrayOfByte[b1]; b2++)
	            arrayOfInt1[b++] = 0; 
	        } 
	      } 
	      j = (j << 1) + 1;
	      for (b1 = 0; b1 < j; b1++)
	        arrayOfInt1[b++] = 0; 
	    } 
	  }
	  
	  private void getScaleFactors_1(int paramInt1, int paramInt2) {
	    ChannelInformation channelInformation = this.channelInfo[paramInt1][paramInt2];
	    int i = this.slen0[channelInformation.scalefac_compress];
	    int j = this.slen1[channelInformation.scalefac_compress];
	    int[] arrayOfInt1 = this.scalefacLong[paramInt2];
	    int[] arrayOfInt2 = this.scalefacShort[paramInt2];
	    channelInformation.part2_length = 0;
	    if (channelInformation.window_switching_flag != 0 && channelInformation.block_type == 2) {
	      if (channelInformation.mixed_block_flag != 0) {
	        channelInformation.part2_length = 17 * i + 18 * j;
	        byte b;
	        for (b = 0; b < 8; b++)
	          arrayOfInt1[b] = this.maindataStream.getBits9(i); 
	        for (b = 9; b < 18; b++)
	          arrayOfInt2[b] = this.maindataStream.getBits9(i); 
	        for (b = 18; b < 36; b++)
	          arrayOfInt2[b] = this.maindataStream.getBits9(j); 
	      } else {
	        channelInformation.part2_length = 18 * (i + j);
	        byte b;
	        for (b = 0; b < 18; b++)
	          arrayOfInt2[b] = this.maindataStream.getBits9(i); 
	        for (b = 18; b < 36; b++)
	          arrayOfInt2[b] = this.maindataStream.getBits9(j); 
	      } 
	    } else {
	      int k = this.scfsi[paramInt2];
	      if (paramInt1 == 0) {
	        channelInformation.part2_length = 10 * (i + j) + i;
	        byte b;
	        for (b = 0; b < 11; b++)
	          arrayOfInt1[b] = this.maindataStream.getBits9(i); 
	        for (b = 11; b < 21; b++)
	          arrayOfInt1[b] = this.maindataStream.getBits9(j); 
	      } else {
	        channelInformation.part2_length = 0;
	        if ((k & 0x8) == 0) {
	          for (byte b = 0; b < 6; b++)
	            arrayOfInt1[b] = this.maindataStream.getBits9(i); 
	          channelInformation.part2_length += 6 * i;
	        } 
	        if ((k & 0x4) == 0) {
	          for (byte b = 6; b < 11; b++)
	            arrayOfInt1[b] = this.maindataStream.getBits9(i); 
	          channelInformation.part2_length += 5 * i;
	        } 
	        if ((k & 0x2) == 0) {
	          for (byte b = 11; b < 16; b++)
	            arrayOfInt1[b] = this.maindataStream.getBits9(j); 
	          channelInformation.part2_length += 5 * j;
	        } 
	        if ((k & 0x1) == 0) {
	          for (byte b = 16; b < 21; b++)
	            arrayOfInt1[b] = this.maindataStream.getBits9(j); 
	          channelInformation.part2_length += 5 * j;
	        } 
	      } 
	    } 
	  }
	  
	  private void huffBits(int paramInt1, int paramInt2) {
	    ChannelInformation channelInformation = this.channelInfo[paramInt1][paramInt2];
	    if (channelInformation.window_switching_flag != 0) {
	      int i = this.header.getVersion();
	      if (i == 3 || (i == 2 && channelInformation.block_type == 2)) {
	        channelInformation.region1Start = 36;
	        channelInformation.region2Start = 576;
	      } else if (i == 0) {
	        if (channelInformation.block_type == 2 && channelInformation.mixed_block_flag == 0) {
	          channelInformation.region1Start = this.sfbIndexLong[6];
	        } else {
	          channelInformation.region1Start = this.sfbIndexLong[8];
	        } 
	        channelInformation.region2Start = 576;
	      } else {
	        channelInformation.region1Start = 54;
	        channelInformation.region2Start = 576;
	      } 
	    } else {
	      int i = channelInformation.region0_count + 1;
	      int j = i + channelInformation.region1_count + 1;
	      if (j > this.sfbIndexLong.length - 1)
	        j = this.sfbIndexLong.length - 1; 
	      channelInformation.region1Start = this.sfbIndexLong[i];
	      channelInformation.region2Start = this.sfbIndexLong[j];
	    } 
	    this.rzeroIndex[paramInt2] = this.maindataStream.decodeHuff(channelInformation, this.hv);
	  }
	  
	  private void requantizer(int paramInt1, int paramInt2, float[] paramArrayOffloat) {
	    int[] arrayOfInt = this.scalefacLong[paramInt2];
	    ChannelInformation channelInformation = this.channelInfo[paramInt1][paramInt2];
	    boolean bool = (channelInformation.preflag == 1) ? true : false;
	    int i = 1 + channelInformation.scalefac_scale;
	    int j = this.rzeroIndex[paramInt2];
	    int k = 0;
	    byte b1 = 0, b2 = 0;
	    int m = 0;
	    byte b3 = 0;
	    int n = 0;
	    int i1 = 255 - channelInformation.global_gain;
	    if (this.header.isMS())
	      i1 += 2; 
	    if (channelInformation.window_switching_flag == 1 && channelInformation.block_type == 2) {
	      this.rzeroBandShort[2] = -1;
	      this.rzeroBandShort[1] = -1;
	      this.rzeroBandShort[0] = -1;
	      if (channelInformation.mixed_block_flag == 1) {
	        this.rzeroBandLong = -1;
	        for (; b1 < 8; b1++) {
	          int b = bool ? this.pretab[b1] : 0;
	          float f = this.floatPow2[i1 + (arrayOfInt[b1] + b << i)];
	          int i2 = this.widthLong[b1];
	          for (k = 0; k < i2; k++) {
	            int i3 = this.hv[b2];
	            if (i3 < 0) {
	              paramArrayOffloat[b2] = -f * this.floatPowIS[-i3];
	              this.rzeroBandLong = b1;
	            } else if (i3 > 0) {
	              paramArrayOffloat[b2] = f * this.floatPowIS[i3];
	              this.rzeroBandLong = b1;
	            } else {
	              paramArrayOffloat[b2] = 0.0F;
	            } 
	            b2++;
	          } 
	        } 
	        this.rzeroBandShort[2] = 2;
	        this.rzeroBandShort[1] = 2;
	        this.rzeroBandShort[0] = 2;
	        this.rzeroBandLong++;
	        b1 = 3;
	        b3 = 9;
	        n = 36;
	      } 
	      int[] arrayOfInt1 = this.scalefacShort[paramInt2];
	      int[] arrayOfInt2 = channelInformation.subblock_gain;
	      arrayOfInt2[0] = arrayOfInt2[0] << 3;
	      arrayOfInt2[1] = arrayOfInt2[1] << 3;
	      arrayOfInt2[2] = arrayOfInt2[2] << 3;
	      for (; b2 < j; b1++) {
	        int i2 = this.widthShort[b1];
	        for (byte b = 0; b < 3; b++) {
	          float f = this.floatPow2[i1 + arrayOfInt2[b] + (arrayOfInt1[b3++] << i)];
	          m = n + b;
	          for (k = 0; k < i2; k++) {
	            int i3 = this.hv[b2];
	            if (i3 < 0) {
	              paramArrayOffloat[m] = -f * this.floatPowIS[-i3];
	              this.rzeroBandShort[b] = b1;
	            } else if (i3 > 0) {
	              paramArrayOffloat[m] = f * this.floatPowIS[i3];
	              this.rzeroBandShort[b] = b1;
	            } else {
	              paramArrayOffloat[m] = 0.0F;
	            } 
	            b2++;
	            m += 3;
	          } 
	        } 
	        n = m - 2;
	      } 
	      this.rzeroBandShort[0] = this.rzeroBandShort[0] + 1;
	      this.rzeroBandShort[1] = this.rzeroBandShort[1] + 1;
	      this.rzeroBandShort[2] = this.rzeroBandShort[2] + 1;
	      this.rzeroBandLong++;
	    } else {
	      m = -1;
	      for (; b2 < j; b1++) {
	        int b = bool ? this.pretab[b1] : 0;
	        float f = this.floatPow2[i1 + (arrayOfInt[b1] + b << i)];
	        k = b2 + this.widthLong[b1];
	        for (; b2 < k; b2++) {
	          int i2 = this.hv[b2];
	          if (i2 < 0) {
	            paramArrayOffloat[b2] = -f * this.floatPowIS[-i2];
	            m = b1;
	          } else if (i2 > 0) {
	            paramArrayOffloat[b2] = f * this.floatPowIS[i2];
	            m = b1;
	          } else {
	            paramArrayOffloat[b2] = 0.0F;
	          } 
	        } 
	      } 
	      this.rzeroBandLong = m + 1;
	    } 
	    for (; b2 < -1; b2++)
	      paramArrayOffloat[b2] = 0.0F; 
	  }
	  
	  private void ms_stereo(int paramInt) {
	    float[] arrayOfFloat1 = this.xrch0[paramInt], arrayOfFloat2 = this.xrch1[paramInt];
	    int i = (this.rzeroIndex[0] > this.rzeroIndex[1]) ? this.rzeroIndex[0] : this.rzeroIndex[1];
	    for (byte b = 0; b < i; b++) {
	      float f1 = arrayOfFloat1[b];
	      float f2 = arrayOfFloat2[b];
	      arrayOfFloat1[b] = f1 + f2;
	      arrayOfFloat2[b] = f1 - f2;
	    } 
	    this.rzeroIndex[1] = i;
	    this.rzeroIndex[0] = i;
	  }
	  
	  private void is_lines_1(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5) {
	    for (int i = paramInt3; i > 0; i--) {
	      float f = this.xrch0[paramInt5][paramInt2];
	      this.xrch0[paramInt5][paramInt2] = f * this.is_coef[paramInt1];
	      this.xrch1[paramInt5][paramInt2] = f * this.is_coef[6 - paramInt1];
	      paramInt2 += paramInt4;
	    } 
	  }
	  
	  private void is_lines_2(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
	    for (int i = paramInt4; i > 0; i--) {
	      float f = this.xrch0[paramInt6][paramInt3];
	      if (paramInt2 == 0) {
	        this.xrch1[paramInt6][paramInt3] = f;
	      } else if ((paramInt2 & 0x1) == 0) {
	        this.xrch1[paramInt6][paramInt3] = f * this.lsf_is_coef[paramInt1][paramInt2 - 1 >> 1];
	      } else {
	        this.xrch0[paramInt6][paramInt3] = f * this.lsf_is_coef[paramInt1][paramInt2 - 1 >> 1];
	        this.xrch1[paramInt6][paramInt3] = f;
	      } 
	      paramInt3 += paramInt5;
	    } 
	  }
	  
	  private void intensity_stereo(int paramInt) {
	    ChannelInformation channelInformation = this.channelInfo[paramInt][1];
	    if ((this.channelInfo[paramInt][0]).mixed_block_flag != channelInformation.mixed_block_flag || (this.channelInfo[paramInt][0]).block_type != channelInformation.block_type)
	      return; 
	    if (this.isMPEG1) {
	      if (channelInformation.block_type == 2) {
	        for (byte b = 0; b < 3; b++) {
	          int i = this.rzeroBandShort[b];
	          for (; i < 12; i++) {
	            int k = 3 * this.sfbIndexShort[i] + b;
	            int j = this.scalefacShort[1][3 * i + b];
	            if (j < 7)
	              is_lines_1(j, k, this.widthShort[i], 3, paramInt); 
	          } 
	        } 
	      } else {
	        for (int i = this.rzeroBandLong; i <= 21; i++) {
	          int j = this.scalefacLong[1][i];
	          if (j < 7)
	            is_lines_1(j, this.sfbIndexLong[i], this.widthLong[i], 1, paramInt); 
	        } 
	      } 
	    } else {
	      int i = channelInformation.scalefac_compress & 0x1;
	      if (channelInformation.block_type == 2) {
	        for (byte b = 0; b < 3; b++) {
	          int j = this.rzeroBandShort[b];
	          for (; j < 12; j++) {
	            int m = 3 * this.sfbIndexShort[j] + b;
	            int k = this.scalefacShort[1][3 * j + b];
	            is_lines_2(i, k, m, this.widthShort[j], 3, paramInt);
	          } 
	        } 
	      } else {
	        for (int j = this.rzeroBandLong; j <= 21; j++)
	          is_lines_2(i, this.scalefacLong[1][j], this.sfbIndexLong[j], this.widthLong[j], 1, paramInt); 
	      } 
	    } 
	  }
	  
	  private void antialias(int paramInt1, int paramInt2, float[] paramArrayOffloat) {
	    int i;
	    float[] arrayOfFloat = paramArrayOffloat;
	    if ((this.channelInfo[paramInt1][paramInt2]).block_type == 2) {
	      if ((this.channelInfo[paramInt1][paramInt2]).mixed_block_flag == 0)
	        return; 
	      i = 18;
	    } else {
	      i = this.rzeroIndex[paramInt2] - 18;
	    } 
	    for (byte b = 0; b < i; b += 18) {
	      float f1 = arrayOfFloat[b + 17];
	      float f2 = arrayOfFloat[b + 18];
	      arrayOfFloat[b + 17] = f1 * 0.8574929F + f2 * 0.51449573F;
	      arrayOfFloat[b + 18] = f2 * 0.8574929F - f1 * 0.51449573F;
	      f1 = arrayOfFloat[b + 16];
	      f2 = arrayOfFloat[b + 19];
	      arrayOfFloat[b + 16] = f1 * 0.881742F + f2 * 0.47173196F;
	      arrayOfFloat[b + 19] = f2 * 0.881742F - f1 * 0.47173196F;
	      f1 = arrayOfFloat[b + 15];
	      f2 = arrayOfFloat[b + 20];
	      arrayOfFloat[b + 15] = f1 * 0.94962865F + f2 * 0.31337744F;
	      arrayOfFloat[b + 20] = f2 * 0.94962865F - f1 * 0.31337744F;
	      f1 = arrayOfFloat[b + 14];
	      f2 = arrayOfFloat[b + 21];
	      arrayOfFloat[b + 14] = f1 * 0.9833146F + f2 * 0.1819132F;
	      arrayOfFloat[b + 21] = f2 * 0.9833146F - f1 * 0.1819132F;
	      f1 = arrayOfFloat[b + 13];
	      f2 = arrayOfFloat[b + 22];
	      arrayOfFloat[b + 13] = f1 * 0.9955178F + f2 * 0.09457419F;
	      arrayOfFloat[b + 22] = f2 * 0.9955178F - f1 * 0.09457419F;
	      f1 = arrayOfFloat[b + 12];
	      f2 = arrayOfFloat[b + 23];
	      arrayOfFloat[b + 12] = f1 * 0.9991606F + f2 * 0.04096558F;
	      arrayOfFloat[b + 23] = f2 * 0.9991606F - f1 * 0.04096558F;
	      f1 = arrayOfFloat[b + 11];
	      f2 = arrayOfFloat[b + 24];
	      arrayOfFloat[b + 11] = f1 * 0.9998992F + f2 * 0.0141986F;
	      arrayOfFloat[b + 24] = f2 * 0.9998992F - f1 * 0.0141986F;
	      f1 = arrayOfFloat[b + 10];
	      f2 = arrayOfFloat[b + 25];
	      arrayOfFloat[b + 10] = f1 * 0.99999315F + f2 * 0.0036999746F;
	      arrayOfFloat[b + 25] = f2 * 0.99999315F - f1 * 0.0036999746F;
	    } 
	  }
	  
	  private void imdct12(float[] paramArrayOffloat1, float[] paramArrayOffloat2, int paramInt) {
	    float[] arrayOfFloat = paramArrayOffloat1;
	    float f1 = 0.0F, f2 = 0.0F, f3 = 0.0F, f4 = 0.0F, f5 = 0.0F, f6 = 0.0F;
	    float f7 = 0.0F, f8 = 0.0F, f9 = 0.0F, f10 = 0.0F, f11 = 0.0F, f12 = 0.0F;
	    float f13 = 0.0F, f14 = 0.0F, f15 = 0.0F, f16 = 0.0F, f17 = 0.0F, f18 = 0.0F;
	    for (byte b = 0; b != 3; b++) {
	      int i = b + paramInt;
	      arrayOfFloat[12 + i] = arrayOfFloat[12 + i] + arrayOfFloat[9 + i];
	      arrayOfFloat[15 + i] = arrayOfFloat[15 + i] + arrayOfFloat[12 + i] + arrayOfFloat[9 + i] + arrayOfFloat[6 + i];
	      arrayOfFloat[6 + i] = arrayOfFloat[6 + i] + arrayOfFloat[3 + i];
	      arrayOfFloat[9 + i] = arrayOfFloat[9 + i] + arrayOfFloat[6 + i] + arrayOfFloat[3 + i] + arrayOfFloat[i];
	      arrayOfFloat[3 + i] = arrayOfFloat[3 + i] + arrayOfFloat[i];
	      float f19, f20, f24 = (f19 = arrayOfFloat[i]) - (f20 = arrayOfFloat[12 + i]);
	      float f21 = f19 + f20 * 0.5F;
	      float f22 = arrayOfFloat[6 + i] * 0.8660254F;
	      float f23 = f21 + f22;
	      float f25 = f21 - f22;
	      float f27 = ((f19 = arrayOfFloat[3 + i]) - (f20 = arrayOfFloat[15 + i])) * 0.7071068F;
	      f21 = f19 + f20 * 0.5F;
	      f22 = arrayOfFloat[9 + i] * 0.8660254F;
	      float f28 = (f21 + f22) * 0.5176381F;
	      float f26 = (f21 - f22) * 1.9318516F;
	      float f29 = f23;
	      f23 += f28;
	      f28 = f29 - f28;
	      f29 = f24;
	      f24 += f27;
	      f27 = f29 - f27;
	      f29 = f25;
	      f25 += f26;
	      f26 = f29 - f26;
	      f29 = f26 * 0.1072064F;
	      switch (b) {
	        case 0:
	          f1 = f29;
	          f2 = f27 * 0.5F;
	          f3 = f28 * 2.3319511F;
	          f4 = -f28 * 3.039058F;
	          f5 = -f27 * 1.2071068F;
	          f6 = -f29 * 7.595754F;
	          f13 = f25 * 0.6248445F;
	          f14 = f24 * 0.5F;
	          f15 = f23 * 0.4000996F;
	          f16 = f23 * 0.3070072F;
	          f17 = f24 * 0.2071068F;
	          f18 = f25 * 0.0822623F;
	          break;
	        case 1:
	          f7 = f29 - f13;
	          f8 = f27 * 0.5F - f14;
	          f9 = f28 * 2.3319511F - f15;
	          f10 = -f28 * 3.039058F - f16;
	          f11 = -f27 * 1.2071068F - f17;
	          f12 = -f29 * 7.595754F - f18;
	          f13 = f25 * 0.6248445F;
	          f14 = f24 * 0.5F;
	          f15 = f23 * 0.4000996F;
	          f16 = f23 * 0.3070072F;
	          f17 = f24 * 0.2071068F;
	          f18 = f25 * 0.0822623F;
	          break;
	        case 2:
	          i = paramInt;
	          arrayOfFloat[i + 0] = paramArrayOffloat2[i + 0];
	          arrayOfFloat[i + 1] = paramArrayOffloat2[i + 1];
	          arrayOfFloat[i + 2] = paramArrayOffloat2[i + 2];
	          arrayOfFloat[i + 3] = paramArrayOffloat2[i + 3];
	          arrayOfFloat[i + 4] = paramArrayOffloat2[i + 4];
	          arrayOfFloat[i + 5] = paramArrayOffloat2[i + 5];
	          arrayOfFloat[i + 6] = paramArrayOffloat2[i + 6] + f1;
	          arrayOfFloat[i + 7] = paramArrayOffloat2[i + 7] + f2;
	          arrayOfFloat[i + 8] = paramArrayOffloat2[i + 8] + f3;
	          arrayOfFloat[i + 9] = paramArrayOffloat2[i + 9] + f4;
	          arrayOfFloat[i + 10] = paramArrayOffloat2[i + 10] + f5;
	          arrayOfFloat[i + 11] = paramArrayOffloat2[i + 11] + f6;
	          arrayOfFloat[i + 12] = paramArrayOffloat2[i + 12] + f7;
	          arrayOfFloat[i + 13] = paramArrayOffloat2[i + 13] + f8;
	          arrayOfFloat[i + 14] = paramArrayOffloat2[i + 14] + f9;
	          arrayOfFloat[i + 15] = paramArrayOffloat2[i + 15] + f10;
	          arrayOfFloat[i + 16] = paramArrayOffloat2[i + 16] + f11;
	          arrayOfFloat[i + 17] = paramArrayOffloat2[i + 17] + f12;
	          paramArrayOffloat2[i + 0] = f29 - f13;
	          paramArrayOffloat2[i + 1] = f27 * 0.5F - f14;
	          paramArrayOffloat2[i + 2] = f28 * 2.3319511F - f15;
	          paramArrayOffloat2[i + 3] = -f28 * 3.039058F - f16;
	          paramArrayOffloat2[i + 4] = -f27 * 1.2071068F - f17;
	          paramArrayOffloat2[i + 5] = -f29 * 7.595754F - f18;
	          paramArrayOffloat2[i + 6] = -f25 * 0.6248445F;
	          paramArrayOffloat2[i + 7] = -f24 * 0.5F;
	          paramArrayOffloat2[i + 8] = -f23 * 0.4000996F;
	          paramArrayOffloat2[i + 9] = -f23 * 0.3070072F;
	          paramArrayOffloat2[i + 10] = -f24 * 0.2071068F;
	          paramArrayOffloat2[i + 11] = -f25 * 0.0822623F;
	          paramArrayOffloat2[i + 14] = 0.0F;
	          paramArrayOffloat2[i + 13] = 0.0F;
	          paramArrayOffloat2[i + 12] = 0.0F;
	          paramArrayOffloat2[i + 17] = 0.0F;
	          paramArrayOffloat2[i + 16] = 0.0F;
	          paramArrayOffloat2[i + 15] = 0.0F;
	          break;
	      } 
	    } 
	  }
	  
	  private void imdct36(float[] paramArrayOffloat1, float[] paramArrayOffloat2, int paramInt1, int paramInt2) {
	    float[] arrayOfFloat1 = paramArrayOffloat1;
	    float[] arrayOfFloat2 = paramArrayOffloat2;
	    int i = paramInt1;
	    arrayOfFloat1[i + 16] = arrayOfFloat1[i + 16] + arrayOfFloat1[i + 15];
	    arrayOfFloat1[i + 17] = arrayOfFloat1[i + 17] + arrayOfFloat1[i + 16] + arrayOfFloat1[i + 15] + arrayOfFloat1[i + 14];
	    arrayOfFloat1[i + 14] = arrayOfFloat1[i + 14] + arrayOfFloat1[i + 13];
	    arrayOfFloat1[i + 15] = arrayOfFloat1[i + 15] + arrayOfFloat1[i + 14] + arrayOfFloat1[i + 13] + arrayOfFloat1[i + 12];
	    arrayOfFloat1[i + 12] = arrayOfFloat1[i + 12] + arrayOfFloat1[i + 11];
	    arrayOfFloat1[i + 13] = arrayOfFloat1[i + 13] + arrayOfFloat1[i + 12] + arrayOfFloat1[i + 11] + arrayOfFloat1[i + 10];
	    arrayOfFloat1[i + 10] = arrayOfFloat1[i + 10] + arrayOfFloat1[i + 9];
	    arrayOfFloat1[i + 11] = arrayOfFloat1[i + 11] + arrayOfFloat1[i + 10] + arrayOfFloat1[i + 9] + arrayOfFloat1[i + 8];
	    arrayOfFloat1[i + 8] = arrayOfFloat1[i + 8] + arrayOfFloat1[i + 7];
	    arrayOfFloat1[i + 9] = arrayOfFloat1[i + 9] + arrayOfFloat1[i + 8] + arrayOfFloat1[i + 7] + arrayOfFloat1[i + 6];
	    arrayOfFloat1[i + 6] = arrayOfFloat1[i + 6] + arrayOfFloat1[i + 5];
	    arrayOfFloat1[i + 7] = arrayOfFloat1[i + 7] + arrayOfFloat1[i + 6] + arrayOfFloat1[i + 5] + arrayOfFloat1[i + 4];
	    arrayOfFloat1[i + 4] = arrayOfFloat1[i + 4] + arrayOfFloat1[i + 3];
	    arrayOfFloat1[i + 5] = arrayOfFloat1[i + 5] + arrayOfFloat1[i + 4] + arrayOfFloat1[i + 3] + arrayOfFloat1[i + 2];
	    arrayOfFloat1[i + 2] = arrayOfFloat1[i + 2] + arrayOfFloat1[i + 1];
	    arrayOfFloat1[i + 3] = arrayOfFloat1[i + 3] + arrayOfFloat1[i + 2] + arrayOfFloat1[i + 1] + arrayOfFloat1[i + 0];
	    arrayOfFloat1[i + 1] = arrayOfFloat1[i + 1] + arrayOfFloat1[i + 0];
	    float f1 = arrayOfFloat1[i + 0] + arrayOfFloat1[i + 12] * 0.5F;
	    float f2 = arrayOfFloat1[i + 0] - arrayOfFloat1[i + 12];
	    float f3 = arrayOfFloat1[i + 8] + arrayOfFloat1[i + 16] - arrayOfFloat1[i + 4];
	    float f23 = f2 + f3;
	    float f4 = f2 - f3 * 0.5F;
	    float f5 = (arrayOfFloat1[i + 10] + arrayOfFloat1[i + 14] - arrayOfFloat1[i + 2]) * 0.8660254F;
	    float f20 = f4 - f5;
	    float f26 = f4 + f5;
	    float f6 = (arrayOfFloat1[i + 4] + arrayOfFloat1[i + 8]) * 0.9396926F;
	    float f7 = (arrayOfFloat1[i + 16] - arrayOfFloat1[i + 8]) * 0.1736482F;
	    float f8 = -(arrayOfFloat1[i + 4] + arrayOfFloat1[i + 16]) * 0.7660444F;
	    float f18 = f1 - f6 - f8;
	    float f9 = f6 + f1 + f7;
	    float f10 = f1 + f8 - f7;
	    float f13 = arrayOfFloat1[i + 6] * 0.8660254F;
	    float f11 = (arrayOfFloat1[i + 2] + arrayOfFloat1[i + 10]) * 0.9848078F;
	    float f12 = (arrayOfFloat1[i + 14] - arrayOfFloat1[i + 10]) * 0.3420201F;
	    float f14 = f11 + f12 + f13;
	    float f19 = f9 + f14;
	    float f27 = f9 - f14;
	    float f15 = -(arrayOfFloat1[i + 2] + arrayOfFloat1[i + 14]) * 0.6427876F;
	    float f16 = f11 + f15 - f13;
	    float f17 = f12 - f15 - f13;
	    float f22 = f10 + f16;
	    float f24 = f10 - f16;
	    float f21 = f18 + f17;
	    float f25 = f18 - f17;
	    f1 = arrayOfFloat1[i + 1] + arrayOfFloat1[i + 13] * 0.5F;
	    f2 = arrayOfFloat1[i + 1] - arrayOfFloat1[i + 13];
	    f3 = arrayOfFloat1[i + 9] + arrayOfFloat1[i + 17] - arrayOfFloat1[i + 5];
	    float f32 = (f2 + f3) * 0.7071068F;
	    f4 = f2 - f3 * 0.5F;
	    f5 = (arrayOfFloat1[i + 11] + arrayOfFloat1[i + 15] - arrayOfFloat1[i + 3]) * 0.8660254F;
	    float f35 = (f4 - f5) * 0.5176381F;
	    float f29 = (f4 + f5) * 1.9318517F;
	    f6 = (arrayOfFloat1[i + 5] + arrayOfFloat1[i + 9]) * 0.9396926F;
	    f7 = (arrayOfFloat1[i + 17] - arrayOfFloat1[i + 9]) * 0.1736482F;
	    f8 = -(arrayOfFloat1[i + 5] + arrayOfFloat1[i + 17]) * 0.7660444F;
	    f18 = f1 - f6 - f8;
	    f9 = f6 + f1 + f7;
	    f10 = f1 + f8 - f7;
	    f13 = arrayOfFloat1[i + 7] * 0.8660254F;
	    f11 = (arrayOfFloat1[i + 3] + arrayOfFloat1[i + 11]) * 0.9848078F;
	    f12 = (arrayOfFloat1[i + 15] - arrayOfFloat1[i + 11]) * 0.3420201F;
	    f14 = f11 + f12 + f13;
	    float f36 = (f9 + f14) * 0.5019099F;
	    float f28 = (f9 - f14) * 5.7368565F;
	    f15 = -(arrayOfFloat1[i + 3] + arrayOfFloat1[i + 15]) * 0.6427876F;
	    f16 = f11 + f15 - f13;
	    f17 = f12 - f15 - f13;
	    float f33 = (f10 + f16) * 0.6103873F;
	    float f31 = (f10 - f16) * 0.8717234F;
	    float f34 = (f18 + f17) * 0.551689F;
	    float f30 = (f18 - f17) * 1.1831008F;
	    float f37 = f19;
	    f19 += f36;
	    f36 = f37 - f36;
	    f37 = f20;
	    f20 += f35;
	    f35 = f37 - f35;
	    f37 = f21;
	    f21 += f34;
	    f34 = f37 - f34;
	    f37 = f22;
	    f22 += f33;
	    f33 = f37 - f33;
	    f37 = f23;
	    f23 += f32;
	    f32 = f37 - f32;
	    f37 = f24;
	    f24 += f31;
	    f31 = f37 - f31;
	    f37 = f25;
	    f25 += f30;
	    f30 = f37 - f30;
	    f37 = f26;
	    f26 += f29;
	    f29 = f37 - f29;
	    f37 = f27;
	    f27 += f28;
	    f28 = f37 - f28;
	    float[] arrayOfFloat3 = this.imdctWin[paramInt2];
	    arrayOfFloat1[i + 0] = arrayOfFloat2[i + 0] + f28 * arrayOfFloat3[0];
	    arrayOfFloat1[i + 1] = arrayOfFloat2[i + 1] + f29 * arrayOfFloat3[1];
	    arrayOfFloat1[i + 2] = arrayOfFloat2[i + 2] + f30 * arrayOfFloat3[2];
	    arrayOfFloat1[i + 3] = arrayOfFloat2[i + 3] + f31 * arrayOfFloat3[3];
	    arrayOfFloat1[i + 4] = arrayOfFloat2[i + 4] + f32 * arrayOfFloat3[4];
	    arrayOfFloat1[i + 5] = arrayOfFloat2[i + 5] + f33 * arrayOfFloat3[5];
	    arrayOfFloat1[i + 6] = arrayOfFloat2[i + 6] + f34 * arrayOfFloat3[6];
	    arrayOfFloat1[i + 7] = arrayOfFloat2[i + 7] + f35 * arrayOfFloat3[7];
	    arrayOfFloat1[i + 8] = arrayOfFloat2[i + 8] + f36 * arrayOfFloat3[8];
	    arrayOfFloat1[i + 9] = arrayOfFloat2[i + 9] + f36 * arrayOfFloat3[9];
	    arrayOfFloat1[i + 10] = arrayOfFloat2[i + 10] + f35 * arrayOfFloat3[10];
	    arrayOfFloat1[i + 11] = arrayOfFloat2[i + 11] + f34 * arrayOfFloat3[11];
	    arrayOfFloat1[i + 12] = arrayOfFloat2[i + 12] + f33 * arrayOfFloat3[12];
	    arrayOfFloat1[i + 13] = arrayOfFloat2[i + 13] + f32 * arrayOfFloat3[13];
	    arrayOfFloat1[i + 14] = arrayOfFloat2[i + 14] + f31 * arrayOfFloat3[14];
	    arrayOfFloat1[i + 15] = arrayOfFloat2[i + 15] + f30 * arrayOfFloat3[15];
	    arrayOfFloat1[i + 16] = arrayOfFloat2[i + 16] + f29 * arrayOfFloat3[16];
	    arrayOfFloat1[i + 17] = arrayOfFloat2[i + 17] + f28 * arrayOfFloat3[17];
	    arrayOfFloat2[i + 0] = f27 * arrayOfFloat3[18];
	    arrayOfFloat2[i + 1] = f26 * arrayOfFloat3[19];
	    arrayOfFloat2[i + 2] = f25 * arrayOfFloat3[20];
	    arrayOfFloat2[i + 3] = f24 * arrayOfFloat3[21];
	    arrayOfFloat2[i + 4] = f23 * arrayOfFloat3[22];
	    arrayOfFloat2[i + 5] = f22 * arrayOfFloat3[23];
	    arrayOfFloat2[i + 6] = f21 * arrayOfFloat3[24];
	    arrayOfFloat2[i + 7] = f20 * arrayOfFloat3[25];
	    arrayOfFloat2[i + 8] = f19 * arrayOfFloat3[26];
	    arrayOfFloat2[i + 9] = f19 * arrayOfFloat3[27];
	    arrayOfFloat2[i + 10] = f20 * arrayOfFloat3[28];
	    arrayOfFloat2[i + 11] = f21 * arrayOfFloat3[29];
	    arrayOfFloat2[i + 12] = f22 * arrayOfFloat3[30];
	    arrayOfFloat2[i + 13] = f23 * arrayOfFloat3[31];
	    arrayOfFloat2[i + 14] = f24 * arrayOfFloat3[32];
	    arrayOfFloat2[i + 15] = f25 * arrayOfFloat3[33];
	    arrayOfFloat2[i + 16] = f26 * arrayOfFloat3[34];
	    arrayOfFloat2[i + 17] = f27 * arrayOfFloat3[35];
	  }
	  
	  private void hybrid(int paramInt1, int paramInt2, float[] paramArrayOffloat1, float[] paramArrayOffloat2) {
	    ChannelInformation channelInformation = this.channelInfo[paramInt1][paramInt2];
	    int i = this.rzeroIndex[paramInt2];
	    byte b;
	    for (b = 0; b < i; b += 18) {
	      int bool = (channelInformation.window_switching_flag != 0 && channelInformation.mixed_block_flag != 0 && b < 36) ? 0 : channelInformation.block_type;
	      if (bool == 2) {
	        imdct12(paramArrayOffloat1, paramArrayOffloat2, b);
	      } else {
	        imdct36(paramArrayOffloat1, paramArrayOffloat2, b, bool);
	      } 
	    } 
	    for (; b < -1; b++) {
	      paramArrayOffloat1[b] = paramArrayOffloat2[b];
	      paramArrayOffloat2[b] = 0.0F;
	    } 
	  }
	  
	  public int decodeFrame(byte[] paramArrayOfbyte, int paramInt) {
	    int i = getSideInfo(paramArrayOfbyte, paramInt);
	    if (i < 0)
	      return paramInt + this.header.getFrameSize() - 4; 
	    paramInt = i;
	    int j = this.header.getMainDataSize();
	    int k = this.maindataStream.getSize();
	    if (k < this.main_data_begin) {
	      this.maindataStream.append(paramArrayOfbyte, paramInt, j);
	      return paramInt + j;
	    } 
	    int m = k - this.maindataStream.getBytePos() - this.main_data_begin;
	    this.maindataStream.skipBytes(m);
	    this.maindataStream.append(paramArrayOfbyte, paramInt, j);
	    paramInt += j;
	    for (byte b = 0; b < this.granules; b++) {
	      if (this.isMPEG1) {
	        getScaleFactors_1(b, 0);
	      } else {
	        getScaleFactors_2(b, 0);
	      } 
	      huffBits(b, 0);
	      requantizer(b, 0, this.xrch0[b]);
	      if (this.channels == 2) {
	        if (this.isMPEG1) {
	          getScaleFactors_1(b, 1);
	        } else {
	          getScaleFactors_2(b, 1);
	        } 
	        huffBits(b, 1);
	        requantizer(b, 1, this.xrch1[b]);
	        if (this.header.isMS())
	          ms_stereo(b); 
	        if (this.header.isIntensityStereo())
	          intensity_stereo(b); 
	      } 
	      antialias(b, 0, this.xrch0[b]);
	      hybrid(b, 0, this.xrch0[b], this.preBlckCh0);
	      if (this.channels == 2) {
	        antialias(b, 1, this.xrch1[b]);
	        hybrid(b, 1, this.xrch1[b], this.preBlckCh1);
	      } 
	    } 
	    try {
	      synchronized (this) {
	        while (this.semaphore < this.channels)
	          wait(); 
	        this.semaphore = 0;
	      } 
	    } catch (InterruptedException interruptedException) {
	      close();
	      return paramInt;
	    } 
	    outputAudio();
	    this.xrch0 = this.filterCh0.startSynthesis();
	    if (this.channels == 2)
	      this.xrch1 = this.filterCh1.startSynthesis(); 
	    return paramInt;
	  }
	  
	  public synchronized void close() {
	    this.semaphore = this.channels;
	    notify();
	    super.close();
	    this.filterCh0.shutdown();
	    if (this.channels == 2)
	      this.filterCh1.shutdown(); 
	  }
	  
	  public synchronized void submitSynthesis() {
	    if (++this.semaphore == this.channels)
	      notify(); 
	  }
	  
	  public class ChannelInformation {
	    protected int part2_3_length;
	    
	    protected int big_values;
	    
	    private int global_gain;
	    
	    private int scalefac_compress;
	    
	    private int window_switching_flag;
	    
	    private int block_type;
	    
	    private int mixed_block_flag;
	    
	    private ChannelInformation() {}
	    
	    protected int[] table_select = new int[3];
	    
	    private int[] subblock_gain = new int[3];
	    
	    private int region0_count;
	    
	    private int region1_count;
	    
	    private int preflag;
	    
	    private int scalefac_scale;
	    
	    protected int count1table_select;
	    
	    protected int region1Start;
	    
	    protected int region2Start;
	    
	    protected int part2_length;
	  }
	}

